﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Transactions;
using MINERP.BLL.Common;
using MINERP.COM;
using MINERP.DAL;
using MINERP.DAL.CommonDAL;
using MINERP.DAL.DisJoin;
using MINERP.MODEL.DisjoinProForOutShop;
using MINERP.MODEL.FoundationModel;
using MINERP.MODEL.OverOrder;
using System.Data.Objects;
using System.Data.Common;
using MINERP.BLL.CustomerManage;

namespace MINERP.BLL.DisjoinProForOutShop
{
    public class ExportOutProductBLL
    {
        public List<PhotoInfo_Info>GetPhotosBuProductid(int inOrderproductid)
        {
             List<PhotoInfo_Info> rtnList=new List<PhotoInfo_Info>();
            using (newSampleYPDBEntities db=new newSampleYPDBEntities())
            {
                List<photoInfo> listPhoto = db.photoInfo.Where(p => p.orderInfo.OrderProductId == inOrderproductid).ToList();
                foreach (photoInfo list in listPhoto)
                {
                    PhotoInfo_Info view = new PhotoInfo_Info() { Height = list.Height, Width = list.Width, PhotoName = list.photoName, PhotoBarCode = list.PhotoBarCode, Status = list.status, TotalNum = (int)list.TotalNum, PicPath = list.picPath, PhotoId = list.photoId };
                   rtnList.Add(view);
                }
            }
            return rtnList;
        }

    }
}
